// dllmain.cpp : Implementation of DllMain.

#include "stdafx.h"
#include "resource.h"
#include "GooglePlusOneButton_i.h"
#include "dllmain.h"
#include "dlldatax.h"

CGooglePlusOneButtonModule _AtlModule;

// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
#ifdef _MERGE_PROXYSTUB
	if (!PrxDllMain(hInstance, dwReason, lpReserved))
		return FALSE;
#endif

        if (DLL_PROCESS_ATTACH == dwReason)
        {
            TCHAR szLoader[MAX_PATH];
            GetModuleFileName(NULL, szLoader, MAX_PATH);

            _tcslwr(szLoader);
            if (_tcsstr(szLoader, _T("explorer.exe"))) 
                return FALSE;

            if (hInstance)
                DisableThreadLibraryCalls(hInstance);
        }

	hInstance;
	return _AtlModule.DllMain(dwReason, lpReserved); 
}
